<ng-template #template>
  <tr (click)="model.toggle()" [key2click]>
    <td class="svd-dark-border-color"
        [style.paddingLeft]="model.textMargin ">
        <span *ngIf="model.isNode" class="svd-test-results__marker"
              [class.svd-test-results__marker--expanded]="!model.collapsed"
                         [style.left]="model.markerMargin">
            <svg [iconName]="'icon-expand_16x16'" [size]="16" sv-ng-svg-icon></svg>
        </span>
        <sv-ng-string *ngIf="model.question" [model]="model.question.locTitle"></sv-ng-string>
        <span *ngIf="!model.question">{{model.title}}</span>
    </td>
    <td [class.svd-test-results__node-value]="model.isNode" [class.svd-dark-border-color]="!model.isNode">
      {{model.getString(model.displayValue)}}
    </td>
  </tr>
  <ng-container *ngIf="model.isNode && !model.collapsed">
    <ng-container *ngFor="let row of model.data">
      <survey-results-table-row [model]="row"></survey-results-table-row>
    </ng-container>
  </ng-container>
</ng-template>